function move(ele, ops, cb) {
    clearInterval(ele.t);
    ele.t = setInterval(() => {
        let flag = true;
        for (let i in ops) {
            let now = i === "opacity" ? getStyle(ele, i) * 100 : parseInt(getStyle(ele, i));
            let speed = (ops[i] - now) / 6;
            speed = speed < 0 ? Math.floor(speed) : Math.ceil(speed);
            ele.style[i] = i === "opacity" ? (now + speed) / 100 : now + speed + "px";
            if (now !== ops[i]) {
                flag = false;
            }
        }
        if (flag) {
            clearInterval(ele.t);
            cb && cb();
        }
    }, 30);
}

function getStyle(ele, attr) {
    return getComputedStyle ? getComputedStyle(ele)[attr] : ele.currentStyle[attr];
}